<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:v-bind="http://www.w3.org/2005/Atom">
<head th:include="include/header_css::header('')"></head>
<body>
	<div id="dpLTE" class="container-fluid" v-cloak>
		<table class="form" id="form">
        <tr>
            <!--<td class="formTitle">课程id<font face="宋体">*</font></td>-->
            <!--<td class="formValue">-->
                <!--<input type="text" class="form-control" placeholder="课程id" v-model.trim="liveXcxCourses.cid" isvalid="yes" checkexpession="NotNull">-->
            <!--</td>-->
            <td class="formTitle">标题<font face="宋体">*</font></td>
            <td class="formValue">
                <input type="text" class="form-control" placeholder="" v-model.trim="liveXcxCourses.title"
                       isvalid="yes" checkexpession="LenStr" length="64">
            </td>
        </tr>
        <tr>
            <td class="formTitle">副标题<font face="宋体">*</font></td>
            <td class="formValue">
                <input type="text" class="form-control" placeholder="副标题" v-model.trim="liveXcxCourses.subtitle"
                       isvalid="yes" checkexpession="LenStr" length="64">
            </td>
        </tr>
        <tr>
            <td class="formTitle">摘要</td>
            <td class="formValue">
                <input type="text" class="form-control" placeholder="摘要" v-model.trim="liveXcxCourses.summary"
                       isvalid="no" checkexpession="NotNull">
            </td>
        </tr>
        <tr>
            <td class="formTitle">封面图<font face="宋体">*</font></td>
            <td class="formValue">
                <template v-if="liveXcxCourses.cover!=null">
                    <!-- 1，隐藏域，作为真实值上传至服务器 -->
                    <img id="liveXcxCourses-cover" class="thumbnail" alt="封面" :src='liveXcxCourses.cover'
                         style="height: 148.5px;width:138.5px;"/>
                </template>
                <a id="cover" class="col-xs-2 btn btn-primary"><i class="fa fa-cloud-upload"></i>&nbsp;上传封面</a>
            </td>
        </tr>
        <tr>
            <td class="formTitle">音频地址<font face="宋体">*</font></td>
            <td class="formValue">
                <!-- 1，隐藏域，作为真实值上传至服务器 -->
                <div class="form-group">
                    <!--<label class="col-xs-2 control-label">医疗保障：</label>-->
                    <label id="sourceurl" class="col-xs-2 btn btn-primary"><i
                            class="fa fa-cloud-upload"></i>&nbsp;上传音频</label>
                    <div class="col-xs-10">
                        <!--<input type="text" disabled class="form-control" placeholder="音视频地址"-->
                               <!--v-model.trim="liveXcxCourses.sourceurl" isvalid="yes" checkexpession="NotNull">-->
                        <audio controls="true" id="liveXcxCourses-sourceurl" preload="auto" :src="liveXcxCourses.sourceurl"></audio>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td class="formTitle">时长(秒)<font face="宋体">*</font></td>
            <td class="formValue">
                <input type="text" disabled class="form-control" placeholder="时长：秒数" v-model.trim="liveXcxCourses.duration"
                       isvalid="yes" checkexpession="NotNull">
            </td>
        </tr>
        <tr>
            <td class="formTitle">课程类型<font face="宋体">*</font></td>
            <td class="formValue">
                <label class="radio-inline">
                    <input type="radio" name="series" value="0" v-model.trim="liveXcxCourses.series"/>单节课
                </label>
                <label class="radio-inline">
                    <input type="radio" name="series" value="1" v-model.trim="liveXcxCourses.series"/>系列课
                </label>
            </td>
        </tr>
        <template v-if="liveXcxCourses.series==1">
            <tr>
                <td class="formTitle">系列课<font face="宋体">*</font></td>
                <td class="formValue">
                    <!--<select class="form-control" v-model.trim="liveXcxCourses.seriesid">-->
                        <!--<option v-for="option in seriesList" :value="option.cid">-->
                            <!--{{ option.title }}-->
                        <!--</option>-->
                    <!--</select>-->
                    <input type="text" class="form-control pointer" placeholder="系列课" v-model.trim="series.title" @click="seriesListDlg" isvalid="yes" checkexpession="NotNull" readonly="readonly">
                </td>
            </tr>
        </template>
        <tr>
            <td class="formTitle">首页焦点<font face="宋体">*</font></td>
            <td class="formValue">
                <label class="radio-inline">
                    <input type="radio" name="focus" value="0" v-model.trim="liveXcxCourses.focus"/>否
                </label>
                <label class="radio-inline">
                    <input type="radio" name="focus" value="1" v-model.trim="liveXcxCourses.focus"/>是
                </label>
            </td>
        </tr>
        <tr>
            <td class="formTitle">分类<font face="宋体">*</font></td>
            <td class="formValue">
                <div class="form-group form-group-sm margin-bottom-5px">
                    <div class="col-xs-3">
                        <select class="form-control" v-model.trim="liveXcxCourses.liveparenttype">
                            <option v-for="option in liveparenttypes" :value="option.typeid">
                                {{ option.name }}
                            </option>
                        </select>
                    </div>
                    <div class="col-xs-3">
                        <select class="form-control" v-model.trim="liveXcxCourses.livetype">
                            <option v-for="option in livetypes" :value="option.typeid">
                                {{ option.name }}
                            </option>
                        </select>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td class="formTitle">单卖<font face="宋体">*</font></td>
            <td class="formValue">
                <label class="radio-inline">
                    <input type="radio" name="singlesold" value="0" v-model.trim="liveXcxCourses.singlesold"/> 否
                </label>
                <label class="radio-inline">
                    <input type="radio" name="singlesold" value="1" v-model.trim="liveXcxCourses.singlesold"/> 是
                </label>
            </td>
        </tr>
        <tr>
            <td class="formTitle">排序序号<font face="宋体">*</font></td>
            <td class="formValue">
                <input type="text" class="form-control" placeholder="首页展示的排序序号" v-model.trim="liveXcxCourses.sort" isvalid="yes" checkexpession="NotNull">
            </td>
        </tr>
        <tr>
            <td class="formTitle">购买价格<font face="宋体">*</font></td>
            <td class="formValue">
                <input type="text" class="form-control" placeholder="课程购买价格" v-model.trim="liveXcxCourses.fee" isvalid="yes" checkexpession="NotNull">
            </td>
        </tr>
        <tr>
            <td class="formTitle">是否活动<font face="宋体">*</font></td>
            <td class="formValue">
                <label class="radio-inline">
                    <input type="radio" name="activities" value="0" v-model.trim="liveXcxCourses.activities"/> 否
                </label>
                <label class="radio-inline">
                    <input type="radio" name="activities" value="1" v-model.trim="liveXcxCourses.activities"/> 是
                </label>
            </td>
        </tr>
        <template v-if="liveXcxCourses.activities==1">
            <tr>
                <td class="formTitle">活动价<font face="宋体">*</font></td>
                <td class="formValue">
                    <input type="text" class="form-control" placeholder="活动价" v-model.trim="liveXcxCourses.activitiesfee" isvalid="yes" errormsg="最少0.01元" min="0.01"
                           length="11"
                           checkexpession="DoubleWithRange">
                </td>
            </tr>
        </template>
        <tr>
            <td class="formTitle">首页推荐<font face="宋体">*</font></td>
            <td class="formValue">
                <label class="radio-inline">
                <input type="radio" name="recommend" value="0" v-model.trim="liveXcxCourses.recommend"/> 否
            </label>
                <label class="radio-inline">
                    <input type="radio" name="recommend" value="1" v-model.trim="liveXcxCourses.recommend"/> 是
                </label>
            </td>
        </tr>
        <tr>
            <td class="formTitle">内容<font face="宋体">*</font></td>
            <td class="">
                <textarea id="liveXcxCourses-content" style="width:100%;height:300px;padding-top:10px;"></textarea>
            </td>
        </tr>
		</table>
	</div>
	<div th:include="include/footer_js::footer"></div>
	<script th:src="@{/js/srblive_html/courses/add.js}"></script>
</body>
</html>